package com.test;

import ibatis.Users;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.bingo.dao.UsersDAO;
import com.bingo.facade.IusersFacade;
import com.bingo.facadeImpl.UsersFacadeImpl;



public class getUserMain {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ApplicationContext context=new ClassPathXmlApplicationContext("classpath:springConfig/applicationContext*.xml");
		IusersFacade userfacade=(IusersFacade)context.getBean("usersFacade");
		Users user=null;
		try {
			user=(Users)userfacade.select("users.getUser", 1);
		} catch (Exception e) {
			e.printStackTrace();
		}
		if(user!=null)
			System.out.println("userInfor:"+user.getUsername()+"\r\nemail:"+user.getUseremail());
		

	}

}
